let arr = [2,3,8,1,4,65,32,98]
// 冒泡排序
for(let i = arr.length-1, tmp; i > 0; i--){
  for(let j=0; j<i; j++){
    tmp = arr[j]
    if(tmp > arr[j + 1]){
      arr[j] = arr[j + 1]
      arr[j + 1] = tmp
    }
  }
}

console.log(arr)
